import dva from 'dva'
import createLoading from 'dva-loading';
const createHistory = require('history').createBrowserHistory;

// Initialize
const app = dva({
  history: createHistory(),
  initialState: { }
});

// Plugins
app.use(createLoading());


// Model
require('./models').default.forEach(key => app.model(key.default));

// router
app.router(require('./routes').default);

//  start
app.start('#root');
